package com.lqm.dao;

import java.util.List;

import javax.annotation.Resource;

import org.hibernate.SessionFactory;
import org.springframework.orm.hibernate5.support.HibernateDaoSupport;
import org.springframework.stereotype.Repository;

import com.lqm.ssh.Book;
@Repository
public class BookDao extends HibernateDaoSupport{
private SessionFactory sessionFactory;

@Resource(name="sessionFactory")
public void setSuperSessionFactory(SessionFactory sessionFactory) {
	super.setSessionFactory(sessionFactory);
}
	public List<Book> getList(){
		return this.currentSession().createQuery("from Book").list();
	}
	
}
